﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tutor2you
{
    class Program
    {
        static void Main(string[] args)
        {
            List<Employee> employeeList = new List<Employee>();
            string answer = "";
            bool prompt = false;
            Console.WriteLine("Do you need to create a new employee at Tutor2you.Biz:  Y|N");
             answer = Console.ReadLine();
             if (answer == "Y" || answer == "y")
             {
                 prompt = true;
             }
             else
             {
                 prompt = false;
             }
             while (prompt) { 
                //if(answer == "Y" || answer =="y")
                //{
                    Console.WriteLine("Enter the employees First Name: ");
                    string empFname = Console.ReadLine();
                    Console.WriteLine("Enter the employees Last Name: ");
                    string empLname = Console.ReadLine();
                    Console.WriteLine("Enter the employees Department: ");
                    string empDept = Console.ReadLine();
                    Console.WriteLine("Enter the employees salary: ");
                    double empSalary = Convert.ToDouble (Console.ReadLine());

                    Employee newEmployee = new Employee(empFname, empLname,empSalary,empDept);
                    employeeList.Add(newEmployee);
                    Console.WriteLine("Do you need to create a new employee at Tutor2you.Biz:  Y|N");
                    answer = Console.ReadLine();
                    if (answer == "Y" || answer == "y")
                    {
                        prompt = true;
                    }
                    else
                    {
                        prompt = false;
                    }

                    foreach (var item in employeeList)
                    {
                        Console.WriteLine("First Name: " + item.firstName);
                        Console.WriteLine("Last Name: " + item.lastName );
                        Console.WriteLine( "Department: " + item.department );
                        Console.WriteLine("Salary: " + item.salary);

                    }
            //}
            //else
            //{
            //    Console.WriteLine("Exit Tutor2you.biz...");
                
            //}

             }
            Console.ReadLine();

        }

        
    }

    class Employee
    {
        public string firstName { get; set; }
        public string lastName { get; set; }
        public virtual double salary { get; set; }
        public string department { get; set; }

        public Employee() {
            this.firstName = "";
            this.lastName = "";
            this.salary = 0.0;
            this.department = "";
        }
        public Employee(string fname, string lname, double salary, string dept)
        {
            this.firstName = fname;
            this.lastName = lname;
            this.salary = salary;
            this.department = dept;
        }
    }

    class BranchManager : Employee
    {
        public int numSalesStaff { get; set; }
        public int numTutorsStaff { get; set; }
        public BranchManager(string fname, string lname, int salary, string dept,int numSales, int numTutors):base(fname, lname, salary, dept){
            this.numSalesStaff = numSales;
            this.numTutorsStaff = numTutors;
        }
    }

    class SalesPerson : Employee
    {
        public int numCallsIn { get; set; }
        public int numCallsOut { get; set; }
        public int numSalesMade { get; set; }
        public SalesPerson(string fname, string lname, int salary, string dept, int numCin, int numCout, int salesNumber)
            : base(fname, lname, salary, dept)
        {
            this.numCallsIn = numCin;
            this.numCallsOut = numCout;
            this.numSalesMade = salesNumber;
        }
    }
    class Tutor : Employee
    {
        public string Subject { get; set; }
        public int numHours { get; set; }

        public Tutor(string fname, string lname, int salary, string dept, string tutorSubject, int hoursWorked)
            : base(fname, lname, salary, dept)
        {
            this.Subject = tutorSubject;
            this.numHours = hoursWorked;
        }
    }
}
